//package com.example.umeng_sdk;
//
//import android.app.Activity;
//
//import com.umeng.socialize.ShareAction;
//import com.umeng.socialize.UMShareListener;
//import com.umeng.socialize.bean.SHARE_MEDIA;
//import com.umeng.socialize.media.UMImage;
//import com.umeng.socialize.media.UMWeb;
//import com.umeng.socialize.shareboard.ShareBoardConfig;
//import com.umeng.socialize.shareboard.SnsPlatform;
//import com.umeng.socialize.utils.ShareBoardlistener;
//
//import static java.lang.System.out;
//
///**
// * Created by zhangyuncai on 2019/1/5.
// * todo 不要使用该类
// */
//@Deprecated
//public class ShareHelper {
//    public static void getShareDialog(final Activity activity
//            , final String contentUrl) {
//        ShareAction mShareAction = new ShareAction(activity)
//                .setDisplayList(SHARE_MEDIA.WEIXIN, SHARE_MEDIA.FACEBOOK
//                        , SHARE_MEDIA.FACEBOOK_MESSAGER, SHARE_MEDIA.WHATSAPP)
//                .setShareboardclickCallback(new ShareBoardlistener() {
//                    @Override
//                    public void onclick(SnsPlatform snsPlatform, SHARE_MEDIA share_media) {
//                        shareAction(share_media, contentUrl,activity);
//                    }
//                });
//        mShareAction.open(getShareBoardConfig());
//    }
//
//    /**
//     * 分享链接,本地缩略图
//     *
//     * @param share_media
//     * @param contentUrl
//     */
//    public static void shareAction(SHARE_MEDIA share_media, String contentUrl,Activity activity) {
//        String imgUrl="http://img4.imgtn.bdimg.com/it/u=1391739329,206803883&fm=200&gp=0.jpg";
//        String webUrl="http://www.google.com";
////        String webUrl="http://www.facebook.com";
//        String title="分享链接";
//        String desc="google地址";
//        UMImage umImage=new UMImage(activity,"http://img4.imgtn.bdimg.com/it/u=1391739329,206803883&fm=200&gp=0.jpg");
////        web.setThumb(new UMImage(activity, imgResId));
//        UMWeb web = new UMWeb(contentUrl,title,desc,umImage);
//        new ShareAction(activity)
//                .withMedia(web)
////                .withMedia(umImage)
////                .withText(contentUrl)
//                .setPlatform(share_media)
//                .setCallback(new UMShareListener() {
//                    @Override
//                    public void onStart(SHARE_MEDIA share_media) {
//                    }
//
//                    @Override
//                    public void onResult(SHARE_MEDIA share_media) {
//                    }
//
//                    @Override
//                    public void onError(SHARE_MEDIA share_media, Throwable throwable) {
//                    }
//
//                    @Override
//                    public void onCancel(SHARE_MEDIA share_media) {
//                    }
//                })
//                .share();
//    }
//    /**
//     * 获取分享弹出框配置
//     */
//    private static ShareBoardConfig getShareBoardConfig() {
//        ShareBoardConfig config = new ShareBoardConfig();
//        config.setTitleVisibility(false); // 隐藏title
//        config.setShareboardPostion(ShareBoardConfig.SHAREBOARD_POSITION_BOTTOM);
//        config.setMenuItemBackgroundShape(ShareBoardConfig.BG_SHAPE_ROUNDED_SQUARE);
//        config.setCancelButtonVisibility(false); // 隐藏取消按钮
//        config.setIndicatorVisibility(false);
//        config.setTitleText("分享到");
//        config.setCancelButtonText("取消");
//        return config;
//    }
//}
